﻿@{
    ViewBag.Title = "阳极生产指标";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section scripts{
    <script src="~/Areas/Pacm/ViewModels/Pacm.Yjsczb.js"></script>
    <script type="text/javascript">
        using("lookup", easyuifix.datagrid_editor_extend); //动态载入这些组件
        using(['validatebox','combotree','numberbox'],easyuifix.datagrid_editor_extend);
        var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
        ko.bindingViewModel(new viewModel(data));
        // formatter="formatterParent" 
//        var formatterParent = function (value, row) { 
//        return "测试" };
    </script>
}
    <div class="z-toolbar">
        <a id="a_refresh" href="#" plain="true" class="easyui-linkbutton" icon="icon-arrow_refresh" title="刷新" data-bind="click:refreshClick">刷新</a>
        <a id="a_add"    href="#" plain="true" class="easyui-linkbutton" icon="icon-add" title="新增" data-bind="click:addClick">新增</a>
        <a id="a_edit"   href="#" plain="true" class="easyui-linkbutton" icon="icon-edit" data-bind="click:editClick" title="编辑">编辑</a>
        <a id="a_del"    href="#" plain="true" class="easyui-linkbutton" icon="icon-cross" title="删除" data-bind="click:deleteClick">删除</a>
        <a id="a_save"  href="#" plain="true" class="easyui-linkbutton" icon="icon-save" data-bind="click:saveClick" title="保存">保存</a>
        <a href="#" plain="true" class="easyui-linkbutton"  icon="icon-user-accept"     title="审核" data-bind="click:auditClick"  >审核</a>
    </div>
        
    <table id="gridlist" data-bind="treegrid:grid">
            <thead>  
            <tr>  
                <th field="Yjsczb_BillNo"   editor="{type:'validatebox',options:{required: true }}" sortable="true" align="left"    width="100"   >单据编号</th> 
                <th field="Yjsczb_Year"     editor="{type:'validatebox',options:{required: true }}" sortable="true" align="left"    width="70"    >计划年度  </th>  
                <th field="Yjsczb_Month"    editor="{type:'validatebox',options:{required: true }}" sortable="true" align="left"    width="70"   >计划月份    </th>  
                <th field="Yjsczb_Dwid"    editor="{type:'lookup',options:{lookupType:'organize',parentField:'pid'}}" sortable="true" align="left"    width="160"   >单位ID    </th> 
                <th field="Yjsczb_Yjz"    editor="{type:'validatebox',options:{required: true }}" sortable="true" align="right"    width="100"   >阳极组    </th>  
                
                <th field="Yjsczb_Djscyl"     editor="{type:'numberbox',options:{precision:0}}" sortable="true" align="right"    width="100"   >电解生产用量    </th>  
                <th field="Yjsczb_Khyjzzl"      editor="{type:'numberbox',options:{precision:1}}"  sortable="true" align="right"    width="100" >考核阳极组装量</th> 
                <th field="Yjsczb_Wtzzl"      editor="{type:'numberbox',options:{precision:1}}"  sortable="true" align="right"    width="100"  >5天周转量</th>  
                <th field="Yjsczb_Jhyjzzl"    editor="{type:'numberbox',options:{precision:1}}"   sortable="true" align="right"    width="110"  >计划阳极组装量</th>  
                <th field="Yjsczb_Cjql"        editor="{type:'numberbox',options:{precision:1}}" sortable="true" align="right"    width="100"  >残极清理</th>  
                <th field="CreatePerson"  rowspan="2"     sortable="true" align="left"    width="70" >创建人</th> 
                <th field="CreateDate"    rowspan="2"     sortable="true" align="left"    width="70" >创建时间</th> 
                <th field="ApproveState"  rowspan="2"     sortable="true" align="left"    width="60" >审核状态</th> 
                <th field="ApproveDate"   rowspan="2"     sortable="true" align="left"    width="70" >审核时间</th> 

            </tr>                         
        </thead>      
    </table> 

